import request from '@/utils/request'

export default {

    getTreeList() {
        return request({
            url: `/changgou-sys/sys/resource/queryTreeList`,
            method: 'get'
        })
    },

    getTreeAll() {
        return request({
            url: `/changgou-sys/sys/resource/queryTreeAll`,
            method: 'get'
        })
    },

    insert(resource) {
        return request({
            url: `/changgou-sys/sys/resource/insert`,
            method: 'post',
            data: resource
        })
    },
    update(resource) {
        return request({
            url: `/changgou-sys/sys/resource/update`,
            method: 'post',
            data: resource
        })
    },
    delete(id) {
        return request({
            url: `/changgou-sys/sys/resource/delete/${id}`,
            method: 'delete'
        })
    }
}
